package com.mc.model;

import java.util.Date;
import java.util.List;

public class Article {
    private Integer id;

    private String title;

    private String content;

    private Integer author;
    
    //因为文章所归属栏目的级别可能不同，所以没有直接将属性设置为Menu或者SubMenu类型
    private Integer menuId;

    private Short flag;

    private Date date;
    
    private List<ArticleProperty> articleProperties;
    
    private String menuName;
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Integer getAuthor() {
        return author;
    }

    public void setAuthor(Integer author) {
        this.author = author;
    }

    public Integer getMenuId() {
        return menuId;
    }

    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public Short getFlag() {
        return flag;
    }

    public void setFlag(Short flag) {
        this.flag = flag;
    }

    public Date getDate() {
        return date;
    }
    
    public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	
	/**设置菜单名称，方便数据库查询时*/
	public void setNAME(String menuName) {
		this.menuName = menuName;
	}

	/**获取简单时间格式*/
    public String getSimpleDate() {
    	java.text.DateFormat format1 = new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return format1.format(date);
    }
    
    public void setDate(Date date) {
        this.date = date;
    }

	public List<ArticleProperty> getArticleProperties() {
		return articleProperties;
	}

	public void setArticleProperties(List<ArticleProperty> articleProperties) {
		this.articleProperties = articleProperties;
	}
    
    
}